<?php
/**
 * PC 端 尾部公共控制器
 * footercontroller.php
 * 
 * Create on 2015-4-10 16:36:27
 * Create by Jim.Chou
 */
namespace haibao\cms\business\control\pc\common;


class FooterController extends \haibao\cms\business\control\Base{
	
	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	
	/**
	 * 获取模版内容
	 * @param : String $content
	 */
	public function displayTemplateHtml(){

		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		$isNew = 0;
		if($controlData['manual'] && isset($controlData['manual']['isNew'])){
			$isNew = $controlData['manual']['isNew'];
		}
		
		
		$pattern = '/{\$wwwHost}/isU';
		$content = preg_replace($pattern, \haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_HAIBAO_URL),$content);
        
		$path = $this->generateHtmlPath(__CLASS__);
		$domainHost = \haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_STATIC_DOMAIN);
		if(\haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_CDN_DEFAULT)){
			$domainHost = \haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_CDN_DOMAIN);
		}
		$this->assign('isNew', $isNew);
		$this->assign('staticHost', $domainHost);
        $this->assign('staticVersion', \haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_STATIC_VERSION));
		$parameters = array();
		$this->generateHtml($path,$content);
		$content = $this->getHtml($path);
		return $content;
	}
}